How to stop Python code execution when some condition is (not) met

welcome to shbcf.ru